<template>
	<el-container>
		<el-main>
			<el-form  ref="item" :model="item" label-width="150px" style="margin-top: 1%;">
				 
			    <el-form-item label="门票ID" >
                    <el-col :span="10">
					    <el-input v-model="item.ticketId"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="门票名" >
                    <el-col :span="10">
					    <el-input v-model="item.ticketName"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="使用时间" >
                    <el-col :span="10">
					    <el-input v-model="item.ticketDate"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="门票数量" >
                    <el-col :span="10">
					    <el-input v-model="item.ticketNum"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="支付金额" >
                    <el-col :span="10">
					    <el-input v-model="item.money"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="总金额" >
                    <el-col :span="10">
					    <el-input v-model="item.totalMoney"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="订单号" >
                    <el-col :span="10">
					    <el-input v-model="item.orderNo"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="支付单号" >
                    <el-col :span="10">
					    <el-input v-model="item.payOrderNo"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="支付时间" >
                    <el-col :span="10">
					    <el-input v-model="item.payTime"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="用户Id" >
                    <el-col :span="10">
					    <el-input v-model="item.userId"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="用户名称" >
                    <el-col :span="10">
					    <el-input v-model="item.userName"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="景点ID" >
                    <el-col :span="10">
					    <el-input v-model="item.spotId"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="景点名" >
                    <el-col :span="10">
					    <el-input v-model="item.spotName"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="状态" >
                    <el-col :span="10">
					    <el-input v-model="item.status"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="会员电话" >
                    <el-col :span="10">
					    <el-input v-model="item.memberMobile"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="会员名" >
                    <el-col :span="10">
					    <el-input v-model="item.memberNickname"></el-input>
                    </el-col>
				</el-form-item>     
			    <el-form-item label="" >
                    <el-col :span="10">
					    <el-input v-model="item.cityId"></el-input>
                    </el-col>
				</el-form-item>   
			    <el-form-item label="" >
                    <el-col :span="10">
					    <el-input v-model="item.cityName"></el-input>
                    </el-col>
				</el-form-item>   				<el-form-item>
					<el-button type="primary" @click="onSubmit">保存</el-button>
					
				</el-form-item>
			</el-form>
		</el-main>
	</el-container>
</template>

<script>
	import {post} from "@/api/user";
	export default {
		name: "lvyouScenicTicketOrderedit",
		data(){
			return {
				item:{
				},
				id:-1,
			}
		},
		methods:{
			getItemById(){
				let _this = this
				post('/lvyou/lvyouScenicTicketOrder/getById',{
					id:_this.id
				}).then(res =>{
					_this.item =  res.i
				}).catch(err =>{

				})
			},
			onSubmit(){
				this.save()
			},
			save(){
				let _this = this
				post('/lvyou/lvyouScenicTicketOrder/save',_this.item).then(res =>{
					_this.$router.push({path:'/lvyouScenicTicketOrder/list'})
				}).catch(err =>{

				})
			}
		},
		created(){
			this.id =   this.$route.query.id
			this.getItemById()
		}
	}
</script>

<style scoped>
    .el-form-item{
        width: 80%;
    }
</style>
